﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="StartExam.aspx.cs" Inherits="com.orange.examination.WebForm16" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>在线考试系统</title>
      <meta name="viewport" content="width=device-width" />
    <link rel="stylesheet" href="css/StartExam.css" />
    
    <script type="text/javascript">
    self.moveTo(0,0);
    self.resizeTo(screen.availWidth,screen.availHeight);
    function keydown()
    {
      if(event.keyCode==8)//屏蔽退格键
      {
        event.keyCode=0;
        event.returnValue=false;
      }
      if(event.keyCode==13)//屏蔽回车键
      {
        event.keyCode=0;
        event.returnValue=false;
      }
       if(event.keyCode==116)//屏蔽F5刷新键
      {
        event.keyCode=0;
        event.returnValue=false;
      }
    }
    
    function showtime()
    {
      var now=new Date();
      years=now.getFullYear();
      month=now.getMonth()+1;
      dates=now.getDate();
      hours=now.getHours();
      Minutes=now.getMinutes();
      Seconds=now.getSeconds();
      if(hours<10)
      hours="0"+hours;
      if(Minutes<10)
      Minutes="0"+Minutes;
      if(Seconds<10)
      Seconds="0"+Seconds;
      var titletext="当前日期时间为>>>"+years+"年"+month+"月"+dates+"日"+hours+":"+Minutes+":"+Seconds;
      setTimeout("showtime()",1000);
      document.title=titletext;
    }

    </script>
    <link  rel="stylesheet" />
    
</head>
<body 　onkeydown="keydown()" onload="showtime()" oncontextmenu="return false" id="bntOk">
    <form id="form1" runat="server">
       <div class="top">
                <span >学号：</span>
                <asp:Label ID="lblStuNum" runat="server" class="lableText"></asp:Label>

                <span >姓名:</span>
                <asp:Label ID="lblStuName" runat="server" class="lableText"></asp:Label>

                <span >性别:</span>
                <asp:Label ID="lblStuSex" runat="server" class="lableText"></asp:Label>

                <asp:Button ID="btnsubmit" runat="server" OnClick="btnsubmit_Click" Text="交卷"   OnClientClick="return confirm('是否确认提交？');"/>
                
        </div>

        <div class="middle">
        
             <asp:Label ID="lblStuKM" runat="server" ></asp:Label><!--考试科目提示-->
            
             <asp:Label ID="lblEndtime" runat="server"></asp:Label>
             <asp:Label ID="lbltime"  runat="server" ></asp:Label>  <!--考试已用时间-->
        </div>

         <div class="bottom">       
             <asp:Panel ID="Panel1" runat="server" ></asp:Panel>   <!--试题容器--> 
         </div>
    </form>

    <script type="text/javascript">
    var sec = 0;
    var min = 0;
    var hou = 0;
    flag = 0;
    idt = window.setTimeout("ls();", 1000);
    function ls() {
        sec++;
        if (sec == 60) { sec = 0; min += 1; }
        if (min == 60) { min = 0; hou += 1; }
        document.getElementById("lbltime").innerText = min + "分" + sec + "秒";
        idt = window.setTimeout("ls();", 1000);
        if (min == 10) {
            document.getElementById("btnsubmit").click();
        }
    }
    </script>
</body>
</html>

